﻿using System.ComponentModel.DataAnnotations;

namespace IceDog.EFCore.ContosoUniversity.Models
{
    /// <summary>
    /// 年级枚举
    /// </summary>
    public enum Grade
    {
        A, B, C, D, F
    }
    /// <summary>
    /// 课程登记模型
    /// </summary>
    /// <remarks>
    /// 一份注册记录面向一名学生所注册的一门课程
    /// </remarks>
    public class Enrollment
    {
        public int EnrollmentID { get; set; }
        public int CourseID { get; set; }
        public int StudentID { get; set; }
        [DisplayFormat(NullDisplayText = "No grade")]
        public Grade? Grade { get; set; }

        public Course Course { get; set; }
        public Student Student { get; set; }
    }
}